package cn.z2huo.productcenter.management.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Arrays;

/**
 * <p>
 *
 * @author z2huo
 */
@Getter
@RequiredArgsConstructor
public enum ReleaseTypeEnum {

    RISK_REL("RISK", "01"),

    PLAN_REL("PLAN", "02"),

    ;

    private final String value;

    private final String releaseType;

    public static ReleaseTypeEnum fromValue(String value) {
        return Arrays.stream(ReleaseTypeEnum.values())
                .filter(releaseTypeEnum -> releaseTypeEnum.getValue().equals(value)).findFirst().orElse(null);
    }

}
